<?php

namespace app\model;

use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Server extends Base
{

    protected $table = "server";


    protected $connection;


    public function __construct(array $attributes = [])
    {
        parent::__construct($attributes);
        $this->connection = config('database.connections.biqi_game.database');
    }


    public function ServerType(): BelongsTo
    {
        return $this->belongsTo(ServerType::class, 'server_type', 'ulid')->has('AliInstance')->orHas('TencentInstance');
    }

}